package com.heima.admin.controller.v1;

import com.heima.admin.service.AdminService;
import com.heima.model.admin.dtos.LoginDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author atom.hu
 * @version V1.0
 * @Package com.heima.admin.controller.v1
 * @date 2021/12/22 9:33
 */
@RestController
@RequestMapping("/login")
public class AdminLoginController {
    @Autowired
    private AdminService adminService;

    @PostMapping("/in")
    public ResponseResult login(@RequestBody LoginDto dto){
        return adminService.login(dto);
    }
}
